<!--
    @name 案例评审详情
    @author hezm
-->
<template>
  <el-dialog
    title="案例提报详情"
    :visible.sync="dialogVisible"
    @close="close"
    width="70%"
    height="50%"
    :append-to-body="true"
    :close-on-click-modal="false"
  >
	<el-button class="add" type="" style="float:right">审核通过</el-button>
	<el-button class="dele" type="" style="float:right">审核驳回</el-button>
    <div class="filter-container filter-title">基本信息</div>
    <OneTableTemplate :dynamicComponents="formInputs_1"></OneTableTemplate>
    <div class="filter-container filter-title">车辆信息</div>
    <OneTableTemplate :dynamicComponents="formInputs_2"> </OneTableTemplate>
    <!-- 维修项目 -->
    <div class="filter-container filter-title">故障信息</div>
    <OneTableTemplate :dynamicComponents="formInputs_3"> </OneTableTemplate>

    <!-- 维修备件
        <div class="filter-container filter-title">维修备件</div>
        <OneTableTemplate
            ref="table_2"
			:dynamicTableCols="tableHeader_2"
            :isShowPagination="false"
            :dynamicIsShowSelect="false"
		></OneTableTemplate> -->
    <div>
      <el-tabs @tab-click="handleClick">
        <el-tab-pane label="附件" name="first">
          <one-table-template
            ref="multipleTable"
            :dynamic-table-cols="tableCols"
            :dynamic-components="tableComponents5"
            :dynamic-api-config="apiConfig"
            :dynamic-form-fields="formField"
            :dynamic-is-show-select="false"
            :dynamic-is-show-more-btn="true"
            :dynamic-table-defult-height="300"
            :isShowPagination="false"
          />
        </el-tab-pane>
        <el-tab-pane label="审核历史" name="second">
          <one-table-template
            ref="multipleTable"
            :dynamic-table-cols="tableCols2"
            :dynamic-components="tableComponents6"
            :dynamic-api-config="apiConfig2"
            :dynamic-form-fields="formField2"
            :dynamic-is-show-select="false"
            :dynamic-is-show-more-btn="true"
            :dynamic-table-defult-height="300"
            :isShowPagination="false"
          />
        </el-tab-pane>
      </el-tabs>
    </div>
  </el-dialog>
</template>

<script>
import OneTableTemplate from "@/components/templates/oneTable";
import { oneTableWithViewTemplateMixins } from "@/components/mixins/oneTableWithViewTemplateMixins";
export default {
  name: "caseReviewList",
  mixins: [oneTableWithViewTemplateMixins],
  components: {
    OneTableTemplate,
  },
  props: {
    // 是否关闭弹窗
    dialogVisible: {
      type: Boolean,
      default: false,
	}
  },
  data() {
    return {
      formInputs_1: [
        {
          compKey: "key0",
          labelName: "案例编号：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key1",
          labelName: "申报日期：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key2",
          labelName: "门店编码：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key3",
          labelName: "门店名称：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key4",
          labelName: "维修工单：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key5",
          labelName: "重要程度：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: false,
        },
        {
          compKey: "key6",
          labelName: "案例状态：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
      ],
      formInputs_2: [
        {
          compKey: "key0",
          labelName: "VIN码：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
		  isMust: true,
		  isRequire: true,
          disabled: false,
        },
        {
          compKey: "key1",
          labelName: "车辆型号：",
          codeField: "saleOrderCode",
          lookuptype: "VE0185",
          component: () => import("@/components/org/LookupValue"),
          type: "dropdownList",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key2",
          labelName: "车系：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key3",
          labelName: "销售日期：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key4",
          labelName: "生产日期：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
      ],
      formInputs_3: [
        {
          compKey: "key0",
          labelName: "故障编码：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
		  isMust: true,
		  isRequire: true,
          disabled: true,
        },
        {
          compKey: "key1",
          labelName: "故障现象：",
          codeField: "saleOrderCode",
          lookuptype: "VE0185",
          component: () => import("@/components/org/LookupValue"),
          type: "dropdownList",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key2",
          labelName: "故障部位：",
          codeField: "saleOrderCode",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
		  isMust: true,
		  isRequire: true,
        },
        {
          compKey: "key3",
		  labelName: "故障日期：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
		  isMust: true,
		  isRequire: true,
          disabled: true,
        },
        {
          compKey: "key4",
          labelName: "主故障件号：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
		  disabled: true,
		  isRequire: true,
        },
        {
          compKey: "key5",
          labelName: "主故障件名称：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
          isMust: true,
          disabled: true,
        },
        {
          compKey: "key6",
          labelName: "申报人：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
		  isMust: true,
		  isRequire: true,
          disabled: true,
        },
        {
          compKey: "key6",
          labelName: "申报人电话：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput"),
          type: "inputText",
		  isMust: true,
		  isRequire: true,
          disabled: true,
        },
        {
          compKey: "key7",
          labelName: "故障描述：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput/textareaInput"),
          // type: "textarea",
          type: "inputText",
          isMust: true,
          span: 24,
        },
        {
          compKey: "key8",
          labelName: "维修方案：",
          codeField: "isAssign",
          isMul: false,
          component: () => import("@/components/org/commonInput/textareaInput"),
          // type: "textarea",
          type: "inputText",
          isMust: true,
          span: 24,
        },
      ],
      tableHeader_2: [
        // {
        // 	prop: "controlBtn",
        // 	label: "操作", // 操作
        // 	codeField: "orgName",
        // 	width: null,
        // 	align: "center",
        // 	isComponent: true,
        // 	comps: [
        // 		{
        // 			compKey: "propKey0",
        // 			align: "center",
        //             labelName: "删除",
        //             // isShowLabel: false,
        // 			codeField: "orgName",
        // 			clickEvent: (index) => {
        //                 // console.log('asd', index);
        //             },
        // 			component: () =>
        // 				import("@/components/org/linkButton"),
        // 		},
        // 	],
        // },
        {
          label: "备件编码",
          prop: "",
        },
        {
          label: "备件名称",
          prop: "",
        },
        {
          label: "数量",
          prop: "",
        },
        {
          label: "备注",
          prop: "",
        },
      ],
      tableCols: [
        {
          prop: "carSeriesCn",
          label: "附件名称",
          align: "center",
        }
	  ],
	  tableCols2: [
		  {
          prop: "carSeries",
          label: "审核人",
          align: "center",
        },
          {
          prop: "carSeries",
          label: "审核意见",
          align: "center",
        },
          {
          prop: "carSeries",
          label: "审核时间",
          align: "center",
        },
	  ]
    };
  },
  mounted() {
    this.$refs.table_2.list = this.$refs.table_1.list = [
      {
        index: 1,
      },
      {
        index: 2,
      },
      {
        index: 3,
      },
    ];
  },
  methods: {
    close() {
      this.$emit("close");
    },
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>

<style lang="scss" scoped>
</style>